package cn.wk.controller;

import org.springframework.security.access.annotation.Secured;
import org.springframework.security.access.prepost.PostAuthorize;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/dept")
public class DeptController {

    @RequestMapping("/list")
    @PreAuthorize("hasAuthority('dept:list')")
    public String list(){
        return "dept.list";
    }

    @RequestMapping("/add")
    @PreAuthorize("hasAuthority('dept:add')")
    public String add(){
        return "dept.add";
    }

}
